﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wormhole.Engine.CardLibrary.BaseCardTypes;

namespace Wormhole.Engine.CardLibrary.CardTypes
{
	/// <author>RodneyMcKay</author>
	/// <date>04 April 2008</date>
	/// <summary>
	/// The base class for obstacle cards.
	/// </summary>
	public abstract class Obstacle : SkillsCard
	{
		#region Subtitle
		/// <summary>
		/// Events do not have a subtitle.
		/// </summary>
		public override string Subtitle
		{
			get { return null; }
		}
		#endregion

		#region Constructor
		/// <summary>
		/// Initialize a new instance of the class.
		/// </summary>
		/// <param name="owner">The card owner.</param>
		public Obstacle(Player.Player owner)
			: base(owner)
		{

		}
		#endregion

		public override bool CanPlay()
		{
			bool canPlay = false;

			if (base.CanPlay())
			{
				CardProperties.Skill missionSkill = this.Game.Mission.CurrentMission.Type;
				if (this.Skills[missionSkill] != null)
					canPlay = true;
			}

			return canPlay;
		}
	}
}
